popover: Stop using gtk_widget_get_content_size
authorTimm Bäder <mail@baedert.org>
Thu, 23 Nov 2017 10:29:47 +0000 (11:29 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 3 Dec 2017 21:05:15 +0000 (22:05 +0100)
gtk/gtkpopover.c

index e9fe0929e61a2c172d24a5f73ae8201df3cedf02..64032ea6998b19a2a3dcbbcf3c8cced09243d953 100644 (file)
@@ -1215,16 +1215,14 @@ gtk_popover_snapshot (GtkWidget   *widget,
   GtkBorder border;
   graphene_rect_t bounds;
   cairo_t *cr;
-  int width, height;
 
   /* Draw the child first so we can draw the arrow (partially) over it */
   gtk_widget_snapshot_child (widget, priv->contents_widget, snapshot);
 
-  gtk_widget_get_content_size (widget, &width, &height);
-
   graphene_rect_init (&bounds,
                       0, 0,
-                      width, height);
+                      gtk_widget_get_width (widget),
+                      gtk_widget_get_height (widget));
   cr = gtk_snapshot_append_cairo (snapshot,
                                   &bounds,
                                   "Popover");
@@ -1243,7 +1241,8 @@ gtk_popover_snapshot (GtkWidget   *widget,
   /* Render the arrow background */
   gtk_render_background (context, cr,
                          0, 0,
-                         width, height);
+                         gtk_widget_get_width (widget),
+                         gtk_widget_get_height (widget));
 
   /* Render the border of the arrow tip */
   if (border.bottom > 0)